package com.cskaoyan.service;

import com.cskaoyan.exceptionJY.NameRepeatException;
import com.cskaoyan.exceptionJY.RoleExistException;
import com.cskaoyan.model.bean.Admin;
import com.cskaoyan.model.bean.Role;
import com.cskaoyan.model.bean.Storage;
import com.cskaoyan.model.bo.systembo.*;
import com.cskaoyan.model.vo.systemvo.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;

public interface SystemService {
    AdminPageVo queryPage(Integer page, Integer limit, String sort, String order, String username);

    Admin createAdmin(CreateAdminBo createAdminBo) throws NameRepeatException;

    void deleteAdmin(DeleteAdminBo deleteAdminBo);

    Admin updateAdmin(UpdateAdminBo updateAdminBo) throws NameRepeatException;

    RolePageVo roleList(Integer page, Integer limit, String sort, String order, String name);

    Role roleCreate(CreateRoleBo createRoleBo) throws NameRepeatException;

    void roleDelete(DeleteRoleBo deleteRoleBo) throws RoleExistException;

    ArrayList<OptionVo> roleOption();

    void updateRole(UpdateRoleBo updateRoleBo);

    Storage storageCreate(MultipartFile file);

    StoragePageVo storageList(Integer page, Integer limit, String sort, String order, String key, String name);

    void storageDelete(DeleteStorageBo deleteStorageBo);

    Storage storageUpdate(Storage storage);

    PermissionPageVo rolePerGet(Integer roleId);

    void rolePerPost(PermissionBo permissionBo);

    LogPageVo logList(Integer page, Integer limit, String sort, String order, String name);

    AuthInfoVo authInfo(String token);
}
